package gspushmq.v1.thread;

import java.util.concurrent.ThreadPoolExecutor;

public enum GGThreadPoolExecutor {
	pools;
	
	private ThreadPoolExecutor threadpool = null;
	
	void init(ThreadPoolExecutor thp) {
		this.threadpool = thp;
	}
	
	ThreadPoolExecutor getConnection() {
		return this.threadpool;
	}
	
	void destory() {
		if (null != this.threadpool && !this.threadpool.isShutdown()) {
			this.threadpool.shutdown();
		}
		
	}
}
